/* 通用标题样式 */
.section-title {
    position: relative;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    font-weight: 600;
    font-size: 1.2em;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.alert-danger.section-title {
    background: linear-gradient(45deg, #ff6b6b, #ff8787);
    border: none;
    color: white;
}

.alert-info.section-title {
    background: linear-gradient(45deg, #4dabf7, #74c0fc);
    border: none;
    color: white;
}

/* 布局容器 */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 15px;
}

.gallery-grids {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

/* 商品卡片基础样式 */
.gallery-grid {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 30px;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* 热销推荐布局 - 每行3个 */
.col-md-4.gallery-grid.glry-two {
    flex: 0 0 calc(33.33% - 30px);
    margin: 0 15px 30px;
    min-width: 300px;
    height: auto;
}

/* 新品推荐布局 - 每行4个 */
.col-md-3.gallery-grid {
    flex: 0 0 calc(25% - 30px);
    margin: 0 15px 30px;
    min-width: 250px;
}

.gallery-grid:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}

/* 商品图片样式 */
.gallery-grid .product-image {
    display: block;
    position: relative;
    width: 100%;
    padding-bottom: 100%;
    overflow: hidden;
    border-radius: 10px 10px 0 0;
}

.gallery-grid .product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-grid:hover .product-image img {
    transform: scale(1.05);
}

/* 商品信息样式 */
.galy-info {
    padding: 15px;
    background: #fff;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.galy-info p {
    color: #333;
    margin: 0 0 10px 0;
    font-size: 14px;
    line-height: 1.5;
    text-align: center;
}

.prices {
    text-align: center;
    margin-bottom: 15px;
}

.item_price {
    color: #ff4757;
    font-size: 18px;
    font-weight: bold;
    margin: 0;
}

/* 价格前的符号样式 */
.item_price:before {
    content: "¥";
    font-size: 14px;
    margin-right: 2px;
}

/* 操作按钮容器 - 基础样式 */
.button-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 10px;
    background: #f8f9fa;
    border-top: 1px solid #eee;
    margin-top: auto;
}

/* 按钮基础样式 */
.button-container a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 5px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 13px;
    transition: all 0.3s ease;
    white-space: nowrap;
    width: 100%;
    min-height: 36px;
}

/* 热销推荐模块的特殊按钮样式 */
.glry-two .button-container {
    padding: 15px;
    gap: 15px;
    background: #fff;
}

.glry-two .button-container a {
    padding: 12px 20px;
    font-size: 15px;
    border-radius: 6px;
    min-height: 44px;
}

.button-container a.view-details {
    background: #f1f3f5;
    color: #495057;
    border: 1px solid #dee2e6;
}

.button-container a.view-details:hover {
    background: #e9ecef;
    color: #212529;
}

.button-container a.shop {
    background: #4CAF50;
    color: white;
    border: none;
}

.button-container a.shop:hover {
    background: #45a049;
}

.button-container .glyphicon {
    margin-right: 5px;
    font-size: 14px;
}

/* 热销推荐模块的图标样式 */
.glry-two .button-container .glyphicon {
    margin-right: 8px;
    font-size: 16px;
}

/* 确保内容不会溢出 */
* {
    box-sizing: border-box;
    word-wrap: break-word;
}

/* 加入购物车标签样式 */
.add-to-cart-tag {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #4CAF50;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    z-index: 1;
}

/* 热销推荐特殊样式 */
.glry-two {
    height: 500px; /* 热销推荐卡片更高 */
}

.glry-two a {
    /* height: 300px; 热销推荐图片更大 */
}

.galrr-info-two {
    background: rgba(255,255,255,0.98);
}

/* 新品推荐网格布局优化 */
.gallery-grids {
    display: grid;
    gap: 20px;
    margin: 0 -10px;
    padding: 0 10px;
}

@media (min-width: 992px) {
    .gallery-grids {
        grid-template-columns: repeat(4, 1fr);
    }
    
    /* 热销推荐每行显示3个 */
    .gallery-grids .glry-two {
        grid-column: span 1;
    }
}

@media (max-width: 991px) {
    .gallery-grids {
        grid-template-columns: repeat(2, 1fr);
    }
    .gallery-grid {
        height: 400px;
    }
    .glry-two {
        height: 450px;
    }
}

@media (max-width: 576px) {
    .gallery-grids {
        grid-template-columns: 1fr;
    }
    .gallery-grid {
        height: auto;
        min-height: 400px;
    }
}

/* 加载动画 */
.gallery-grid {
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 查看详情按钮样式 */
.gallery-info p a:hover {
    color: #4CAF50;
}

.gallery-info p .glyphicon {
    font-size: 0.9em;
}

/* 商品详情页样式 */
.single {
    padding: 40px 0;
    background: #f8f9fa;
}

.single-grids {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
}

/* 商品图片区域 */
.single-grid .flexslider {
    border: none;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 0;
}

.single-grid .slides img {
    border-radius: 8px;
    width: 100%;
    height: auto;
    object-fit: cover;
}

.single-grid .flex-control-thumbs {
    margin: 15px -5px 0;
}

.single-grid .flex-control-thumbs li {
    width: 33.333%;
    padding: 0 5px;
}

.single-grid .flex-control-thumbs img {
    border-radius: 4px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.single-grid .flex-control-thumbs img:hover,
.single-grid .flex-control-thumbs img.flex-active {
    border-color: #4CAF50;
}

/* 商品信息区域 */
.single-grid.simpleCart_shelfItem {
    padding: 0 30px;
}

.single-grid h3 {
    font-size: 24px;
    color: #333;
    margin: 0 0 15px;
    font-weight: 600;
    line-height: 1.3;
}

.single-grid .tag {
    margin-bottom: 20px;
}

.single-grid .tag p {
    color: #666;
    font-size: 14px;
    margin: 0;
}

.single-grid .tag a {
    color: #4CAF50;
    text-decoration: none;
    transition: color 0.3s ease;
}

.single-grid .tag a:hover {
    color: #45a049;
}

.single-grid > p {
    color: #666;
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 25px;
}

/* 价格样式 */
.single-grid .galry {
    margin-bottom: 25px;
}

.single-grid .prices {
    margin-bottom: 0;
}

.single-grid .item_price {
    font-size: 28px;
    color: #ff4757;
    font-weight: bold;
}

/* 加入购物车按钮 */
.btn_form {
    margin-top: 25px;
}

.btn_form .add-cart {
    display: inline-block;
    padding: 12px 35px;
    background: #4CAF50;
    color: white;
    border-radius: 6px;
    font-size: 16px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    text-align: center;
}

.btn_form .add-cart:hover {
    background: #45a049;
    transform: translateY(-2px);
}

/* 商品分类列表 */
.single-grid1 {
    padding-left: 30px;
}

.single-grid1 ul {
    list-style: none;
    padding: 0;
    margin: 0;
    background: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
}

.single-grid1 ul li {
    border-bottom: 1px solid #eee;
}

.single-grid1 ul li:last-child {
    border-bottom: none;
}

.single-grid1 ul li a {
    display: block;
    padding: 12px 20px;
    color: #555;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 14px;
}

.single-grid1 ul li a:hover {
    background: #4CAF50;
    color: white;
}

/* 响应式调整 */
@media (max-width: 991px) {
    .single-grid.simpleCart_shelfItem {
        padding: 30px 0;
    }
    
    .single-grid1 {
        padding-left: 0;
        margin-top: 30px;
    }
}

@media (max-width: 767px) {
    .single-grids {
        padding: 20px;
    }
    
    .single-grid h3 {
        font-size: 20px;
    }
    
    .single-grid .item_price {
        font-size: 24px;
    }
    
    .btn_form .add-cart {
        width: 100%;
        padding: 10px 20px;
    }
} 